package cn.s1995.sloth.bizs.service;

import cn.hutool.core.lang.tree.Tree;
import cn.s1995.sloth.common.core.util.R;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.s1995.sloth.bizs.entity.ProdCategory;

import java.util.List;

public interface ProdCategoryService extends IService<ProdCategory> {

    boolean saveCategory(ProdCategory req);

    boolean updateCategory(ProdCategory req);

    R removeBatchCategory(Long[] ids);
    List<Tree<Long>> treeMenu(Long pid, String name);

    /**
     * 构建分类path
     * @param ProdCategory
     */
    String buildCategoryPath(ProdCategory ProdCategory);

    /**
     * 构建分类path
     * @param id
     */
    String buildCategoryPath(Long id);
}
